/**
 * 
 */
package vn.edu.hungvuongaptech.model;


/**
 * @author ThanhHQ
 *
 */
public class TimeSheetModel {

	private long timeSheetId;
	private String date;
	private Double time;
	private String description;
	private ProductModel product;
	private WorkModel work;
	private ProcessModel process;
	private UserModel user;
	private StatusModel status;
	private ProjectModel project;
	
	public TimeSheetModel(long timeSheetId, String date, Double time, String description,
			ProductModel product, WorkModel work, ProcessModel process, UserModel user, 
			StatusModel status, ProjectModel project) {
		this.timeSheetId = timeSheetId;
		this.date = date;
		this.time = time;
		this.description = description;
		this.product = product;
		this.work = work;
		this.process = process;
		this.user = user;
		this.status = status;
		this.project = project;
	}
	
	public TimeSheetModel() {
		// TODO : NOTHING
	}
	
	/**
	 * @return the timeSheetId
	 */
	public long getTimeSheetId() {
		return timeSheetId;
	}
	/**
	 * @param timeSheetId the timeSheetId to set
	 */
	public void setTimeSheetId(long timeSheetId) {
		this.timeSheetId = timeSheetId;
	}
	/**
	 * @return the date
	 */
	public String getDate() {
		return date;
	}
	/**
	 * @param date the date to set
	 */
	public void setDate(String date) {
		this.date = date;
	}
	/**
	 * @return the time
	 */
	public Double getTime() {
		return time;
	}
	/**
	 * @param time the time to set
	 */
	public void setTime(Double time) {
		this.time = time;
	}
	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}
	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}
	/**
	 * @return the product
	 */
	public ProductModel getProduct() {
		return product;
	}
	/**
	 * @param product the product to set
	 */
	public void setProduct(ProductModel product) {
		this.product = product;
	}
	/**
	 * @return the work
	 */
	public WorkModel getWork() {
		return work;
	}
	/**
	 * @param work the work to set
	 */
	public void setWork(WorkModel work) {
		this.work = work;
	}
	/**
	 * @return the process
	 */
	public ProcessModel getProcess() {
		return process;
	}
	/**
	 * @param process the process to set
	 */
	public void setProcess(ProcessModel process) {
		this.process = process;
	}
	/**
	 * @return the user
	 */
	public UserModel getUser() {
		return user;
	}
	/**
	 * @param user the user to set
	 */
	public void setUser(UserModel user) {
		this.user = user;
	}
	/**
	 * @return the status
	 */
	public StatusModel getStatus() {
		return status;
	}
	/**
	 * @param status the status to set
	 */
	public void setStatus(StatusModel status) {
		this.status = status;
	}
	/**
	 * @return the project
	 */
	public ProjectModel getProject() {
		return project;
	}
	/**
	 * @param project the project to set
	 */
	public void setProject(ProjectModel project) {
		this.project = project;
	}
	
	public Boolean validateData() {
		Boolean result = true;
				
		if (((date == null) || date.equals("")) 				// Validate date
			  || (time == null)									// Validate time
			  || (description == null || description.equals(""))// Validate description
			  || (project == null)								// Validate project
			  || (process == null)								// Validate process
			  || (work == null)									// Validate work
			  || (product == null)) {							// Validate product
			result = false;
		}
		
		
		return result;
	}
}
